package com.hardson.toolkit.security;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;

import com.hardson.toolkit.util.StrUtil;

/**
 * 不安全的ssl证书的域名认证，忽略所有域名的证书
 *
 * @author hardson
 *
 */
public class UnSafeHostnameVerifier implements HostnameVerifier {
	@Override
	public boolean verify(String hostname, SSLSession session) {
		if (StrUtil.isTrimEmpty(hostname)) {
			return false;
		}
		return true;
	}
}